#include <pingcap/kv/RawClient.h>
#include <iostream>
#include <time.h>

using namespace pingcap;
using namespace pingcap::kv;

int main() {
    auto start = clock();
    std::vector<std::string> pd_addrs{"127.0.0.1:2379"};
    RawClient client(pd_addrs);
    // for(int i = 0; i < 1000000; i++) {
    //     client.Put("raw_key_" + std::to_string(i), "raw_value_" + std::to_string(i));
    // }
    auto data = client.Get("Hello");
    std::cout << data.value() << std::endl;
    auto end = clock();
    client.BatchGet()
    std::cout << "The run time is: " <<(end - start) / 1000 << "ms" << std::endl;
    // for(int i = 0; i < 100; i++) {
    //     auto value = client.Get("key" + std::to_string(i));
    //     std::cout << "value is : " << value.value_or("null") << std::endl; 
    // }
    return 0;
}